package com.jvm123.blog.service

import com.jvm123.blog.entity.Collect
import com.jvm123.blog.entity.CollectPostRelationship

/**
 *
 * @author yawn http://jvm123.com
 *     2019/10/22 20:21
 */
interface CollectService {

    List<Collect> findAll()

    List<Collect> findByType(String type)

    Collect findOne(Long id)

    boolean update(Collect collect)

    boolean relate(long id, String tag, String category)

    boolean removeRepeatRelation(Collection<CollectPostRelationship> collection)

    boolean removeRelation(long id)

    boolean removeRelation(long collectId, long postId)

    List<Collect> findWithPosts()
}
